#include<iostream>
#include<math.h>
class Point
{
    public:
    Point():x(0),y(0){}
    Point(int x,int y):x(x),y(y){}
    void show()
    {


        std::cout<<"("<<x<<","<<y<<")"<<std::endl;
    }

        //友元函数的声明
        
        
        friend double Distance(const Point& p1,const Point& p2);
        friend class Tool;
    
    private:
    int x;
    int y;
};



class Tool
{
    public:
     static double Distance2Zero(const Point &p2)
    {
    return std::sqrt(std::pow(p2.x,2)+std::pow(p2.y,2));

    }


};

double Distance(const Point& p1,const Point& p2)
{
    return std::sqrt(std::pow(p1.x-p2.x,2)+std::pow(p2.y-p1.y,2));

}

int main()
{
        Point p1;
        p1.show();
        Point p2(1,2);
        p2.show();
        std::cout<<Tool::Distance2Zero(p1)<<std::endl;




}